<template>
    <view class="page-branch-add page-branch-audit">
        <view class="mx-4">
            <view class="py-4" v-if="list.length == 0">
                <u-empty text="暂无数据" mode="list"></u-empty>
            </view>
            <view class="info" v-for="(item,index) in list" :key="index">
                <fly-info label="申请时间" :value="item.createTime"></fly-info>
                <fly-info label="新分会" :value="item.newGuildName"></fly-info>
                <fly-info label="原公会" :value="item.guildName"></fly-info>
                <fly-info label="备注" :value="item.remark"></fly-info>
                <fly-info label="状态">
                    <text :class="'status-' + item.status">{{ proxy.$util.setName(item.status, optionData.changeStatus) }}</text>
                </fly-info>
            </view>
        </view>
    </view>
</template>
<script setup lang="ts">
import FlyInfo from '@/components/FlyInfo/index';
import { onShow } from '@dcloudio/uni-app';
import { useOptionData } from '@/stores/optionData';
let optionDataStore = useOptionData();
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
let list = ref([]);
let optionData = reactive({});
const getInitData = async () => {
  optionData.changeStatus = await optionDataStore.getDictList('change_status');
}
const getApplyInfo = () => {
    proxy.$http('get', '/admin/userNewGuilds/userGuildsList', {}, (data,msg) => {
        list.value = data;        
    });
}
onShow(() => {
    getInitData();
    getApplyInfo();
})
</script>
<style>
/* page{height:100%;background:#fff;} */
</style>